determining boolean output of a logic circuit